As a system for performing near field communication, for example, an IC (Integrated Circuit) system is widely known. In an IC card system, a R/W (Reader/Writer) generates an electromagnetic wave to form a so-called RF (Radio Frequency) field (magnetic field). When an IC card is brought close to the R/W, power is supplied to the IC card by electromagnetic induction and data transfer is performed between the IC card and the R/W.
As a communication protocol for performing near field communication typically represented by an IC card system, for example, NFCIP (Near Field Communication Interface and Protocol)-1 is known. NFCIP-1 has also become an international standard as ISO/IEC 18092.
NFCIP-1 specifies the following modes: an active mode that is a communication mode in which each of a plurality of communication devices that transmit and receive data outputs an electromagnetic wave, and modulates the electromagnetic wave to thereby perform transmission of data; and a passive mode that is a communication mode in which one communication device of a plurality of communication devices outputs an electromagnetic wave and modulates the electromagnetic wave to thereby perform transmission of data, and in which another communication device of the plurality of communication devices performs load modulation on the electromagnetic wave outputted by the one communication device to thereby perform transmission of data. A plurality of communication devices compliant with NFCIP-1 communicate with each other in one of the communication modes of the active mode and the passive mode (such a communication method is described in, for example, Japanese Patent Application Publication Laid-open No. 2004-215225).
When a communication device that outputs an electromagnetic wave to start communication, and transmits a command via the electromagnetic wave is called an initiator, and a communication device that transmits (returns) a response to the command transmitted by the initiator is called a target, in communication in passive move, a process called an SDD (Single Device Detection) is performed, whereby the initiator identifies each one of a plurality of targets existing around the initiator.
In an SDD process, the initiator transmits a command requesting for an ID (identification) for identifying a target. Then, the target determines a time slot for transmitting a response in reply to the command from the initiator, by a random number, and transmits a response including an ID for identifying the target at the timing of the time slot determined by the random number.
Since the target determines the time slot for transmitting a response by a random number, it is possible to reduce the probability of a collision that results from responses from two or more targets being transmitted at the timing of the same time slot, in a case where a plurality of targets exist around the initiator.
By receiving a response transmitted from the target, the initiator acquires an ID included in that response, and identifies the target on the basis of that ID. Thereafter, the initiator specifies (designates) the target with which it communicates on the basis of, for example, the ID acquired by the SDD process, and exchanges real data with the target identified by that ID.